import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

// Vant组件和样式
import Vant from 'vant'
import 'vant/lib/index.css'

// ant-design-vue 组件和样式
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import * as Icons from '@ant-design/icons-vue'

//el组件
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


const app = createApp(App)
app.use(router).use(Vant).use(Antd).use(ElementPlus)
  .mount('#app')

//全局注册图标
const icons = Icons
for (const i in icons) {
  app.component(i, icons[i])
}
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
